for tarFrameId=[2,4,5]   
cTarFrame=num2str(tarFrameId);
inFile=['df3to' cTarFrame '.nii'];   outFile=['reg/3' cTarFrame '.mat'];
D=niftiread(inFile);
DisplacementField=squeeze(D);
save(outFile,'DisplacementField');
end